def _write_new_file_implementation(ctx):
    output_file = ctx.actions.declare_file(ctx.attr.output_file_name)
    # ctx.actions.run(
    #     outputs = [output_file],
    #     executable = "cp",
    #     arguments = [ctx.file.input_file_name.path, output_file.path],
    # )

    ctx.actions.run(
        outputs = [output_file],
        executable = "touch",
        arguments = [output_file.path],
    )

    return DefaultInfo(files = depset([output_file]))
    # pass
    # file = open("new_file.txt", "w")
    # file.close()

write_new_file = rule(
    implementation = _write_new_file_implementation,
    attrs = {
        "input_file_name": attr.label(allow_single_file = True),
        "output_file_name": attr.string(),
    },
)
